﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="list.aspx.vb" Inherits="HauntedNetworkingSite.list" %>

<%@ Register src="Banner.ascx" tagname="Banner" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Haunted Networking - List of places</title>
    <link href="StyleSheet2.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <uc1:Banner ID="Banner1" runat="server" />
    
        <br />
        &nbsp;<br />
        <br />
        <br />
        <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Image ID="Image1" runat="server" Height="32px" ImageUrl="~/Images/rss.png" 
            Width="32px" />
        <asp:LinkButton ID="linkButton_Rss" runat="server" CssClass="bannerButtons" 
            Font-Size="XX-Large" PostBackUrl="~/RSS.aspx">RSS Feed</asp:LinkButton>
&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Label ID="label_keepUp" runat="server" Text="Keep Up With The New"></asp:Label>
        <p style="margin-left: 1000px">
                <asp:Image ID="img_AddPlace" runat="server" 
                    ImageUrl="~/Images/Add.gif" />
                <asp:LinkButton ID="linkBtn_AddPlace" runat="server" 
                    CssClass="bannerButtons" Height="32px" PostBackUrl="~/AddPlace.aspx">Add Place</asp:LinkButton>
        <br />
                    </p>
        <br />
        <br />
        <asp:Label ID="label_List" runat="server" Font-Bold="False" 
            Font-Overline="False" Height="0px" 
            Text="Below is a list of haunted places that might interest you:" 
            CssClass="labelClass"></asp:Label>
        <br />
        <br />
        <br />
        <br />
    
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ID" DataSourceID="PlacesDataSource" AllowSorting="True" 
            CellPadding="10" Font-Names="HandelGothic" HorizontalAlign="Center"
            CssClass="gridclass" AllowPaging="True" 
            Width="80%" GridLines="Horizontal">
            <Columns>
                <asp:ImageField DataImageUrlField="Picture" HeaderText="Picture">
                </asp:ImageField>
                <asp:BoundField DataField="Area" HeaderText="Area" SortExpression="Area" />
                <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
                <asp:BoundField DataField="Country" HeaderText="Country" 
                    SortExpression="Country" />
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="details.aspx?id={0}" HeaderText="Details" 
                    Text="Details" />
                <asp:HyperLinkField DataNavigateUrlFields="ViewOnGoogleMaps" 
                    DataTextField="ViewOnGoogleMaps" DataTextFormatString="View On Map" 
                    HeaderText="Map" />
                <asp:HyperLinkField DataNavigateUrlFields="UserName" 
                    DataNavigateUrlFormatString="showLocationsByUser.aspx?UserName={0}" 
                    DataTextField="UserName" HeaderText="Added By" />
                <asp:BoundField DataField="Views" HeaderText="Views" SortExpression="Views" />
            </Columns>
            <HeaderStyle BorderStyle="Double" CssClass="titleclass" />
        </asp:GridView>
        <br />
    
        <asp:SqlDataSource ID="PlacesDataSource" runat="server" 
            ConnectionString="<%$ ConnectionStrings:PlacesConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:PlacesConnectionString.ProviderName %>" 
            
            
            SelectCommand="SELECT [Picture], [Area], [City], [Country], [ViewOnGoogleMaps], [Description], [UserName], [Views], [ID] FROM [locations]">
        </asp:SqlDataSource>
    
        <asp:LinkButton ID="linkButton_AddPlace" runat="server"
            CssClass="linkButtonTextSize" PostBackUrl="~/AddPlace.aspx">Add a Place</asp:LinkButton>
        <br />
    
    </div>
    </form>
</body>
</html>
